import App from "../App";
import Error from "../pages/error";
import Home from "../pages/home";
import Daiban from "../pages/daiban";
import My from "../pages/my";
import Xiaoxi from "../pages/xiaoxi";
import {createBrowserRouter} from 'react-router-dom'


export const router = createBrowserRouter([
  {
    path: "/",
    element: <App></App>,
    children:[
        {
            index:true,
            element:<Home></Home>
        },
        {
            path:"home",
            element:<Home></Home>
        },
         {
            path:"daiban",
            element:<Daiban></Daiban>
        },
        {
            path:"xiaoxi",
            element:<Xiaoxi></Xiaoxi>
        },
        {
            path:"my",
            element:<My></My>
        }
    ]
  },
  {
    path:"*",
    element:<Error></Error>
  }
]);